home *** CD-ROM | disk | FTP | other *** search
/ Freelog 117 / FreelogNo117-OctobreNovembre2013.iso / Programmation / jedit / jedit5.1.0install.exe / {app} / modes / go.xml < prev    next >
Extensible Markup Language  |  2013-07-28  |  6KB  |  175 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!DOCTYPE MODE SYSTEM "xmode.dtd">
  4.  
  5. <!-- Syntax highlighting mode for Go (http://www.golang.org). 
  6.      Jim Lawton (jim.lawton@gmail.com) 
  7.      This is based on the first release of Go, November 2009. -->
  8.  
  9. <MODE>
  10.     <PROPS>
  11.         <PROPERTY NAME="commentStart" VALUE="/*" />
  12.         <PROPERTY NAME="commentEnd" VALUE="*/" />
  13.         <PROPERTY NAME="lineComment" VALUE="//" />
  14.         <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
  15.  
  16.         <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
  17.         <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
  18.         <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
  19.         <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
  20.         <PROPERTY NAME="indentNextLine"
  21.             VALUE="(?!^\s*(#|//)).*(\b(if|for)\s*\(.*\)|\b(else)\b)[^{;]*$" />
  22.         <PROPERTY NAME="unindentThisLine"
  23.             VALUE="^\s*((case\b.*|[\p{Alpha}_][\p{Alnum}_]*)\s*:(?!:)).*$" />
  24.         <PROPERTY NAME="electricKeys" VALUE=":" />
  25.     </PROPS>
  26.  
  27.     <RULES
  28.         IGNORE_CASE="FALSE"
  29.         HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
  30.         
  31.         <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
  32.  
  33.         <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
  34.             <BEGIN>"</BEGIN>
  35.             <END>"</END>
  36.         </SPAN>
  37.         <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
  38.             <BEGIN>'</BEGIN>
  39.             <END>'</END>
  40.         </SPAN>
  41.  
  42.         <SEQ TYPE="LITERAL4">??(</SEQ>
  43.         <SEQ TYPE="LITERAL4">??/</SEQ>
  44.         <SEQ TYPE="LITERAL4">??)</SEQ>
  45.         <SEQ TYPE="LITERAL4">??'</SEQ>
  46.         <SEQ TYPE="LITERAL4">??<</SEQ>
  47.         <SEQ TYPE="LITERAL4">??!</SEQ>
  48.         <SEQ TYPE="LITERAL4">??></SEQ>
  49.         <SEQ TYPE="LITERAL4">??-</SEQ>
  50.         <SEQ TYPE="LITERAL4">??=</SEQ>
  51.  
  52.         <SEQ TYPE="LITERAL4"><:</SEQ>
  53.         <SEQ TYPE="LITERAL4">:></SEQ>
  54.         <SEQ TYPE="LITERAL4"><%</SEQ>
  55.         <SEQ TYPE="LITERAL4">%></SEQ>
  56.         <SEQ TYPE="LITERAL4">%:</SEQ>
  57.  
  58.         <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
  59.             MATCH_TYPE="OPERATOR"
  60.             TYPE="LABEL">:</MARK_PREVIOUS>
  61.  
  62.         <MARK_PREVIOUS
  63.             TYPE="FUNCTION"
  64.             MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
  65.  
  66.         <SEQ TYPE="OPERATOR">=</SEQ>
  67.         <SEQ TYPE="OPERATOR">:=</SEQ>
  68.         <SEQ TYPE="OPERATOR">==</SEQ>
  69.         <SEQ TYPE="OPERATOR">!=</SEQ>
  70.         <SEQ TYPE="OPERATOR">+=</SEQ>
  71.         <SEQ TYPE="OPERATOR">-=</SEQ>
  72.         <SEQ TYPE="OPERATOR">*=</SEQ>
  73.         <SEQ TYPE="OPERATOR">/=</SEQ>
  74.         <SEQ TYPE="OPERATOR">&=</SEQ>
  75.         <SEQ TYPE="OPERATOR">&&</SEQ>
  76.         <SEQ TYPE="OPERATOR">&^</SEQ>
  77.         <SEQ TYPE="OPERATOR">&^=</SEQ>
  78.         <SEQ TYPE="OPERATOR">|=</SEQ>
  79.         <SEQ TYPE="OPERATOR">||</SEQ>
  80.         <SEQ TYPE="OPERATOR">^=</SEQ>
  81.         <SEQ TYPE="OPERATOR">!</SEQ>
  82.         <SEQ TYPE="OPERATOR">+</SEQ>
  83.         <SEQ TYPE="OPERATOR">++</SEQ>
  84.         <SEQ TYPE="OPERATOR">-</SEQ>
  85.         <SEQ TYPE="OPERATOR">--</SEQ>
  86.         <SEQ TYPE="OPERATOR">/</SEQ>
  87.         <SEQ TYPE="OPERATOR">*</SEQ>
  88.         <SEQ TYPE="OPERATOR">></SEQ>
  89.         <SEQ TYPE="OPERATOR"><</SEQ>
  90.         <SEQ TYPE="OPERATOR">>=</SEQ>
  91.         <SEQ TYPE="OPERATOR">>></SEQ>
  92.         <SEQ TYPE="OPERATOR">>>=</SEQ>
  93.         <SEQ TYPE="OPERATOR"><=</SEQ>
  94.         <SEQ TYPE="OPERATOR"><-</SEQ>
  95.         <SEQ TYPE="OPERATOR"><<</SEQ>
  96.         <SEQ TYPE="OPERATOR"><<=</SEQ>
  97.         <SEQ TYPE="OPERATOR">%</SEQ>
  98.         <SEQ TYPE="OPERATOR">%=</SEQ>
  99.         <SEQ TYPE="OPERATOR">&</SEQ>
  100.         <SEQ TYPE="OPERATOR">|</SEQ>
  101.         <SEQ TYPE="OPERATOR">^</SEQ>
  102.         <SEQ TYPE="OPERATOR">?</SEQ>
  103.         <SEQ TYPE="OPERATOR">:</SEQ>
  104.         <SEQ TYPE="OPERATOR">.</SEQ>
  105.         <SEQ TYPE="OPERATOR">...</SEQ>
  106.         <SEQ TYPE="OPERATOR">,</SEQ>
  107.         <SEQ TYPE="OPERATOR">[</SEQ>
  108.         <SEQ TYPE="OPERATOR">]</SEQ>
  109.         <SEQ TYPE="OPERATOR">(</SEQ>
  110.         <SEQ TYPE="OPERATOR">)</SEQ>
  111.         <SEQ TYPE="OPERATOR">}</SEQ>
  112.         <SEQ TYPE="OPERATOR">{</SEQ>
  113.         <SEQ TYPE="OPERATOR">;</SEQ>
  114.  
  115.         <KEYWORDS>
  116.             <KEYWORD1>package</KEYWORD1>
  117.             <KEYWORD1>import</KEYWORD1>
  118.             <KEYWORD1>func</KEYWORD1>
  119.             <KEYWORD1>type</KEYWORD1>
  120.             <KEYWORD1>var</KEYWORD1>
  121.             <KEYWORD1>const</KEYWORD1>
  122.             <KEYWORD1>interface</KEYWORD1>
  123.             <KEYWORD1>chan</KEYWORD1>
  124.  
  125.             <KEYWORD2>for</KEYWORD2>
  126.             <KEYWORD2>goto</KEYWORD2>
  127.             <KEYWORD2>go</KEYWORD2>
  128.             <KEYWORD2>if</KEYWORD2>
  129.             <KEYWORD2>return</KEYWORD2>
  130.             <KEYWORD2>switch</KEYWORD2>
  131.             <KEYWORD2>break</KEYWORD2>
  132.             <KEYWORD2>case</KEYWORD2>
  133.             <KEYWORD2>continue</KEYWORD2>
  134.             <KEYWORD2>default</KEYWORD2>
  135.             <KEYWORD2>else</KEYWORD2>
  136.             <KEYWORD2>defer</KEYWORD2>
  137.             <KEYWORD2>select</KEYWORD2>
  138.             <KEYWORD2>fallthrough</KEYWORD2>
  139.             <KEYWORD2>range</KEYWORD2>
  140.             <KEYWORD2>map</KEYWORD2>
  141.             <KEYWORD2>new</KEYWORD2>
  142.             <KEYWORD2>make</KEYWORD2>
  143.             <KEYWORD2>iota</KEYWORD2>
  144.             
  145.             <KEYWORD3>string</KEYWORD3>
  146.             <KEYWORD3>byte</KEYWORD3>
  147.             <KEYWORD3>bool</KEYWORD3>
  148.             <KEYWORD3>float</KEYWORD3>
  149.             <KEYWORD3>float32</KEYWORD3>
  150.             <KEYWORD3>float64</KEYWORD3>
  151.             <KEYWORD3>int</KEYWORD3>
  152.             <KEYWORD3>int8</KEYWORD3>
  153.             <KEYWORD3>int16</KEYWORD3>
  154.             <KEYWORD3>int32</KEYWORD3>
  155.             <KEYWORD3>int64</KEYWORD3>
  156.             <KEYWORD3>uint</KEYWORD3>
  157.             <KEYWORD3>uint8</KEYWORD3>
  158.             <KEYWORD3>uint16</KEYWORD3>
  159.             <KEYWORD3>uint32</KEYWORD3>
  160.             <KEYWORD3>uint64</KEYWORD3>
  161.             <KEYWORD3>uintptr</KEYWORD3>
  162.             <KEYWORD3>struct</KEYWORD3>
  163.  
  164.             <LITERAL2>nil</LITERAL2>
  165.             <LITERAL2>false</LITERAL2>
  166.             <LITERAL2>true</LITERAL2>
  167.  
  168.         </KEYWORDS>
  169.     </RULES>
  170.  
  171. </MODE>
  172.  
  173.  
  174.             
  175.